set aRectNum to InUnvRect(getaProp(obj, #PopMenu), H, v)
if aRectNum <> #empty then
set the castNum of sprite sCURSORSPRITE to getAt(getaProp(getaProp(obj, #cast), #menu), aRectNum)
set the loc of sprite sCURSORSPRITE to getaProp(getAt(getaProp(obj, #PopMenu), aRectNum), #loc)
updateStage()
if aRectNum = 1 then
set VolObj to getaProp(gOBJECTS, #Volumeobj)
set smallRectNum to gsoundLevel + 1
set the castNum of sprite getaProp(getaProp(gOBJECTS, #SaveOBj), #spriteNum) to getaProp(getaProp(getaProp(gOBJECTS, #SaveOBj), #cast), #VolON)
set the castNum of sprite sCURSORSPRITE to getAt(getaProp(getaProp(VolObj, #cast), #menu), smallRectNum)
set the loc of sprite sCURSORSPRITE to getaProp(getAt(getaProp(VolObj, #PopMenu), smallRectNum), #loc)
updateStage()
UnvVolumeLoop(H, v)
end if
else
set the castNum of sprite sCURSORSPRITE to cNullCast
set the loc of sprite sCURSORSPRITE to point(-2000, -2000)
updateStage()
end if
setaProp(obj, #CurRect, aRectNum)
end
on SetgHotrects OBJS
set rects to resetghotrects(OBJS)
if rects <> 0 then
exit
end if
end
on UnvVolumeLoop H, v
set VolObj to getaProp(gOBJECTS, #Volumeobj)
set aRectNum to InUnvRect(getaProp(VolObj, #PopMenu), H, v)
set the castNum of sprite getaProp(getaProp(gOBJECTS, #SaveOBj), #spriteNum) to getaProp(getaProp(getaProp(gOBJECTS, #SaveOBj), #cast), #VolON)
repeat while (aRectNum <> #empty) and the stillDown
if aRectNum < 9 then
set the castNum of sprite sCURSORSPRITE to getAt(getaProp(getaProp(VolObj, #cast), #menu), aRectNum)
set the loc of sprite sCURSORSPRITE to getaProp(getAt(getaProp(VolObj, #PopMenu), aRectNum), #loc)
if (aRectNum - 1) <> gsoundLevel then
set gsoundLevel to aRectNum - 1
setSoundVolumes()
beep()
end if
end if
updateStage()
set v to the mouseV
set H to the mouseH
set aRectNum to InUnvRect(getaProp(VolObj, #PopMenu), H, v)
end repeat
set the castNum of sprite getaProp(getaProp(gOBJECTS, #SaveOBj), #spriteNum) to getaProp(getaProp(getaProp(gOBJECTS, #SaveOBj), #cast), #down)
end
on InUnvRect Hotrects, H, v
set nHotr to count(Hotrects)
repeat with X = 1 to nHotr
if inside(point(H, v), getaProp(getAt(Hotrects, X), #HotRect)) then
return X
end if
end repeat
return #empty
end
on ShowCredits
set obj to getaProp(gOBJECTS, #TheCredits)
set the loc of sprite getaProp(obj, #spriteNum) to getaProp(obj, #loc)
set the castNum of sprite getaProp(obj, #spriteNum) to getaProp(getaProp(obj, #cast), #HI)
updateStage()
set gCreditTemplist to [#Hotrects: gHotRects, #timer: gTimerList, #VideoLoc: the loc of sprite sQTCharSprite, #VideoRate: the movieRate of sprite sQTCharSprite]
set the movieRate of sprite sQTCharSprite to 0
set gHotRects to [:]
sort(gHotRects)
set gTimerList to [:]
sort(gTimerList)
set the loc of sprite sQTCharSprite to point(-2000, -2000)
set the HotRect of the CreditClose of gOBJECTS to the PDAHOTRECT of the CreditClose of gOBJECTS
set the hotState of the CreditClose of gOBJECTS to #PDA
ADDObjects([#TheCredits])
end
on ShowUnvCredits
SuppendCurrentKF()
DELUnvOBJECTS()
set the HotRect of the CreditClose of gOBJECTS to the POPHOTRECT of the CreditClose of gOBJECTS
set the hotState of the CreditClose of gOBJECTS to #popUp
ADDObjects([#TheCredits])
end
on CloseCredits
if the hotState of the CreditClose of gOBJECTS = #popUp then